import { Row, Col, Button, Image } from "antd"
import React from "react"
import { useNavigate } from "react-router-dom"

import Img from "../assets/img/404.png"
export default function Not() {
  const navigate = useNavigate()
  const goHome = () => {
    navigate("/", {
        replace: true,
      })
  }
  return (
    <Row style={{ backgroundColor: "#f0f2f5", height: "100vh" }}>
      <Col span={12} style={{ height: "100%", marginTop: "150px" }}>
        <Image style={{ marginLeft: "100px" }} src={Img}></Image>
      </Col>
      <Col span={12} style={{ paddingLeft: "50px", marginTop: "200px" }}>
        <h1 style={{ fontSize: "35px" }}>404</h1>
        <h2 style={{ fontSize: "20px", marginBottom: "20px" }}>
          抱歉，你访问的页面不存在
        </h2>
        <div>
          <Button type="primary" onClick={goHome}>
            回到首页
          </Button>
        </div>
      </Col>
    </Row>
  )
}
